@extends('admin.layouts.index')
@section('title', '添加用户')

@section('content')

<div class="row">
    <div class="col-md-12">
        <form id="comment-form" method="POST" action="{{ URL::current() }}">
            <div class="card">
                <div class="card-header">
                    <div class="card-title">添加用户</div>
                </div>
                <div class="card-body">
                    <div class="form-group">
                        <label for="text">用户昵称：</label>
                        <input type="text" class="form-control" name="nike" placeholder="请输入用户昵称" value="{{ old('nike') }}">
                        @csrf
                    </div>
                    <div class="form-group">
                        <label for="text">用户手机号：</label>
                        <input type="text" class="form-control" name="username" placeholder="请在此输入用户手机号" value="{{ old('username') }}">
                    </div>
                    <div class="form-group">
                        <label for="text">用户密码：</label>
                        <input type="text" class="form-control" name="password" placeholder="请在此输入密码" value="{{ old('password') }}">
                    </div>
                    @if(Auth::user()->authority == 3)
                    <div class="form-group">
                        <label for="text">用户权限：</label>
                        <select class="form-control input-square" name="authority">
                            <option value="1">普通用户</option>
                            <option value="2">代理商</option>
                            <option value="3">管理员</option>
                        </select>
                    </div>
                    @endif
                </div>
                <div class="card-action">
                    <button class="btn btn-primary">立即添加</button>
                </div>
            </div>
        </form>
    </div>
</div>


@endsection
